home *** CD-ROM | disk | FTP | other *** search
- /* ======================================================================
- DESC: Common Button Functions for the Administer Operations
-
- PLATFORMS: >= MS IE 4.0
-
- USAGE NOTES:
- ====================================================================== */
- var IfnS = ".gif"; // Image file name suffix; JPG for > 8 bit color; GIF <= 8 bit
- var preLoadDone = false;
-
- /* Preload button images */
- function IMGPreload(img) {
- var a=new Image();
- a.src=img;
- return a;
- }
-
- // Determine Color Depth and Type of image files to use
- //IfnS = (screen.colorDepth > 4) ? ".jpg" : ".gif";
-
- /* Set Button State accordingly to either Normal or Disabled */
- function SetButtonState(BtObj,BState) {
- if (BState == "0") {
- BStrg = "N";
- BtObj.bdis = "0";
- BtObj.style.cursor = "hand";
- }
- else {
- BStrg = "G";
- BtObj.bdis = "1";
- BtObj.style.cursor = "auto";
- }
- BtObj.src = eval("B" + BtObj.btype + BStrg + ".src");
- }
-
- /* Process Button Mouse Events and toggle Buttons accordingly */
- function processButtonMouseOut() {
- if (event.srcElement.bdis == "0") {
- event.srcElement.src = eval("B" + event.srcElement.btype + "N.src");
- }
- }
- function processButtonMouseOver(){
- if (event.srcElement.bdis == "0") {
- event.srcElement.src = eval("B" + event.srcElement.btype + "O.src");
- }
- }
- function processButtonMouseDown() {
- if (event.srcElement.bdis == "0") {
- event.srcElement.src = eval("B" + event.srcElement.btype + "D.src");
- }
- }
- function processButtonMouseUp() {
- if (event.srcElement.bdis == "0") {
- event.srcElement.src = eval("B" + event.srcElement.btype + "O.src");
- }
- }